home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / communic / litecomm / lc.doc next >
Encoding:
Text File  |  1993-03-14  |  110.8 KB  |  4,159 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                       OVERVIEW
  10.                                       OVERVIEW
  11.                                       ________
  12.  
  13.  
  14.             FEATURES
  15.             FEATURES
  16.             ________
  17.  
  18.  
  19.             The LiteComm Toolbox(TM) is a set of powerful routines
  20.             designed to provide easy access to the full capabilities of
  21.             the PC's asynchronous communications ports. In its initial
  22.             release, the LiteComm ToolBox supports fully interrupt-
  23.             driven and buffered communications support on COM1 thru COM4
  24.             simultaneously. Now you can quickly incorporate
  25.             sophisticated communications support in your applications
  26.             without having in-depth knowledge of how the hardware
  27.             functions.
  28.  
  29.  
  30.             The ToolBox was developed as the result of a need to provide
  31.             just this type of support in CAM applications which were
  32.             developed for a client. Each version of the LiteComm ToolBox
  33.             is heavily integrated with its respective host compiler.
  34.  
  35.  
  36.  
  37.             THE SHAREWARE CONCEPT
  38.             THE SHAREWARE CONCEPT
  39.             _____________________
  40.  
  41.  
  42.             Shareware is a "try before you buy" means of software
  43.             distribution. If you find a shareware product useful, pay
  44.             the registration fee, and let the authors know that you
  45.             support their efforts.
  46.  
  47.  
  48.             Information Technology, Ltd., is a member  and supports the
  49.             standards of, ASP, The Association of Shareware
  50.             Professionals.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  77.                              for Microsoft and Turbo C
  78.  
  79.                          LICENSE, WARRANTY AND REGISTRATION
  80.                          LICENSE, WARRANTY AND REGISTRATION
  81.                          __________________________________
  82.  
  83.  
  84.             LICENSE
  85.             LICENSE
  86.             _______
  87.  
  88.  
  89.             The LiteComm ToolBox, small model library only, is
  90.             distributed as a shareware product. To receive all model
  91.             libraries and/or the source code for the product, register
  92.             your copy today. See the registration form at the end of
  93.             this manual.
  94.  
  95.  
  96.             Information Technology, Ltd, grants to registered users a
  97.             non-exclusive, perpetual license to the LiteComm ToolBox,
  98.             subject to these terms and conditions:
  99.  
  100.  
  101.  
  102.                 1. You must treat your copy of the LiteComm Toolbox
  103.                    as you would a book.  You may install the
  104.                    LiteComm ToolBox on more than one machine, but
  105.                    you may use only one copy at a time.  If you
  106.                    desire, site licenses are available at a reduced
  107.                    cost.  You may make as many copies of the
  108.                    LiteComm ToolBox as you require for the sole
  109.                    purpose of backup.
  110.  
  111.  
  112.                 2. You may incorporate portions of the LiteComm
  113.                    ToolBox in products that you develop without the
  114.                    payment of additional royalties or license fees.
  115.                    You must include the statement 'Portions
  116.                    Copyright 1987, 1988, Information Technology,
  117.                    Ltd' in your product's documentation.
  118.  
  119.  
  120.                 3. You may copy and redistribute the shareware
  121.                    portion of the LiteComm ToolBox, commonly known
  122.                    as MCOMM.ARC and TCOMM.ARC, but you may not
  123.                    modify in any way, the contents of the shareware
  124.                    package.  Further, you may not charge a fee for
  125.                    providing such a copy, beyond a maximum $4.00
  126.                    copying or duplication fee, without the express,
  127.                    written consent of Information Technology, Ltd,
  128.  
  129.  
  130.                 4. You may not redistribute, in any form, the
  131.                    source code for the LiteComm ToolBox.  Further,
  132.                    you may not translate the source code for the
  133.                    LiteComm ToolBox into any other language without
  134.                    the express, written consent of Information
  135.                    Technology, Ltd.
  136.  
  137.  
  138.  
  139.  
  140.                                        Page 2
  141.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  142.  
  143.  
  144.  
  145.  
  146.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  147.                              for Microsoft and Turbo C
  148.  
  149.                 5. Information Technology reserves the right to
  150.                    change both the LiteComm ToolBox or its
  151.                    documentation without prior notice, with no
  152.                    obligation to you, the licensee.
  153.  
  154.  
  155.                 6. You agree that any disputes arising from this
  156.                    license will be subject to the laws of the state
  157.                    of Rhode Island.
  158.  
  159.  
  160.                 7. You agree to hold the developer and distributors
  161.                    of the LiteComm ToolBox harmless for any
  162.                    damages, either direct or consequential, that
  163.                    might arise from the use of this product.
  164.  
  165.  
  166.                 8. You acknowledge that the LiteComm ToolBox,
  167.                    libraries, source code, and documentation are
  168.                    the copyrighted property of Information
  169.                    Technology, Ltd.
  170.  
  171.  
  172.                 9. By your use of the LiteComm ToolBox, you
  173.                    acknowledge that you have read, and understand
  174.                    the terms and conditions of this license.
  175.  
  176.  
  177.             WARRANTY
  178.             WARRANTY
  179.             ________
  180.  
  181.  
  182.             The LiteComm ToolBox is distributed as-is and without
  183.             warranty, including, but not limited to, the implied
  184.             warranties of merchantability and fitness for a particular
  185.             purpose.
  186.  
  187.  
  188.             Information Technology, Ltd does warrant the distribution
  189.             media for a period of 30 days.  During that period,
  190.             Information Technology, Ltd will replace the distribution
  191.             media or provide a refund at its option.
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.                                        Page 3
  209.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  210.  
  211.  
  212.  
  213.  
  214.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  215.                              for Microsoft and Turbo C
  216.  
  217.             REGISTERING YOUR COPY
  218.             REGISTERING YOUR COPY
  219.             _____________________
  220.  
  221.  
  222.             Registration of your copy of the LiteComm ToolBox provides
  223.             you with several benefits:
  224.  
  225.  
  226.  
  227.                 1. Puts you on our mailing list for low-cost
  228.                    updates, enhancements, and alert bulletins when
  229.                    they occur.
  230.  
  231.  
  232.                 2. Gives you access to telephone support. Sorry,
  233.                    but we cannot provide support by telephone to
  234.                    unregistered user's of the ToolBox. Unregistered
  235.                    users can leave EMAIL on Compuserve to
  236.                    70166,1152; on GEnie to I.TECH; and on DELPHI to
  237.                    RBMACE. We will respond to EMAIL on an as-
  238.                    available basis.
  239.  
  240.  
  241.                 3.Helps to further the shareware concept.
  242.  
  243.             To register your copy, use the form at the end of this
  244.             documentation.
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.                                        Page 4
  277.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  278.  
  279.  
  280.  
  281.  
  282.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  283.                              for Microsoft and Turbo C
  284.  
  285.             NOTE
  286.             NOTE
  287.             ____
  288.  
  289.  
  290.             LiteComm is a package undergoing continuing development.
  291.             Since its introduction, we have already delivered to
  292.             registered users two protocol engines, LXM - the XMODEM
  293.             engine, which supports both XMODEM and YMODEM protocols and
  294.             LWXM - the Windowed XMODEM engine.
  295.  
  296.             
  297.  
  298.             Implementations of other Xmodem variants are under
  299.             development. We plan to follow these with similar engines
  300.             for CompuServe B, Telink, and other protocols. These
  301.             engines, as they are released, will only be made available
  302.             to registered ToolBox users. The small model library, as
  303.             enhanced but without the protocol engines, will continue to
  304.             be offered as shareware.
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.                                        Page 5
  345.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  346.  
  347.  
  348.  
  349.  
  350.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  351.                              for Microsoft and Turbo C
  352.  
  353.                              COMMUNICATIONS AND THE PC
  354.                              COMMUNICATIONS AND THE PC
  355.                              _________________________
  356.  
  357.  
  358.             PC SHORTCOMINGS
  359.             PC SHORTCOMINGS
  360.             _______________
  361.  
  362.  
  363.             This section is intended as a mini-tutorial on
  364.             ______________________________________________
  365.             communications concepts. We encourage you to read it,
  366.             _____________________________________________________
  367.             although it is not strictly necessary to do so.
  368.             _______________________________________________
  369.  
  370.  
  371.             The IBM-PC, and its close compatibles, is a generally well
  372.             thought-out, flexible, and well-executed computer.
  373.             Unfortunately, not as much can be said for the thought which
  374.             was given to the software which is meant to provide access
  375.             to that hardware. One of the shortcomings which is most
  376.             noticeable is in the support, or rather lack of it, that is
  377.             provided to handle access to the serial port. Support for
  378.             the serial port is limited by the BIOS to polled mode only,
  379.             i.e. a program must interrogate the port on a regular basis
  380.             to avoid losing received characters, and to check to
  381.             determine whether or not the port is ready to send a
  382.             character. Not only is this mode of operation primitive; it
  383.             also tends to cause complications when attempting to perform
  384.             any but the simplest of tasks, at slow speeds.
  385.  
  386.  
  387.             A novice might think that the hardware, in some way, is the
  388.             limiting factor. In fact, everything that is needed,
  389.             hardware-wise, to support a more sophisticated method of
  390.             handling the serial port is already there. All that is
  391.             missing is the software follow-through. The LiteComm ToolBox
  392.             provides this missing software.
  393.  
  394.  
  395.  
  396.             THE 8250 UART
  397.             THE 8250 UART
  398.             _____________
  399.  
  400.  
  401.             The term serial port comes from the fact that both incoming
  402.             and outgoing characters entering and leaving the port do so
  403.             in a bitwise fashion. When we send a character out the
  404.             serial port, the responsible circuitry sends out information
  405.             one bit at a time. When we receive a character, this
  406.             circuitry accepts the individual bits and reassembles them
  407.             into a recognizable character. These very complex operations
  408.             are performed automatically by the 8250 UART (Universal
  409.             Asynchronous Receiver-Transmitter).
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.                                        Page 6
  420.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  421.  
  422.  
  423.  
  424.  
  425.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  426.                              for Microsoft and Turbo C
  427.  
  428.             The 8250 UART is a fully programmable device that permits
  429.             independent control of the various parameters that affect
  430.             serial communications, i.e. baud rate, parity, number of
  431.             data bits, and number of stop bits. The 8250 also optionally
  432.             supports four types of interrupts, error/break detection,
  433.             modem status change detection, transmitter ready, and
  434.             received character ready. The LiteComm ToolBox fully
  435.             supports all four type of interrupts.
  436.  
  437.  
  438.             The term asynchronous implies that there is no absolute
  439.                      asynchronous                                  
  440.                      ____________                                  
  441.             timing associated with the transmission of information.
  442.             Instead, the clocking-in of the data bits is done by
  443.                          clocking-in                            
  444.                          ___________                            
  445.             counting the bits. The first bit sent or received is call
  446.             the start bit and signals the beginning of a new character.
  447.             The individual data bits follow the start bit which are
  448.             clocked out and in at the specified data rate, with the
  449.             least significant bit transferred first and the parity bit,
  450.             if present, transferred last. Finally one or more stop bits
  451.             follow, signalling the end of the character.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.                                        Page 7
  490.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  491.  
  492.  
  493.  
  494.  
  495.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  496.                              for Microsoft and Turbo C
  497.  
  498.             The 8250 UART takes care of all of the mechanics associated
  499.             with the process described in the preceding paragraph. The
  500.             UART will also detect and report error which may occur in
  501.             the process. For example, if the parity bit is incorrect,
  502.             the UART reports the fact. If too few or too many bits are
  503.             received, the UART will report a framing error or overrun
  504.             error respectively.
  505.  
  506.  
  507.             Since the transmission of information may depend on complex
  508.             interactions with another device, such as a modem or
  509.             computer, the 8250 can also report on the status of the
  510.             handshake lines used to provide information about the status
  511.             handshake                                                   
  512.             _________                                                   
  513.             of the connection with the other device. These signals are
  514.             explained below.
  515.  
  516.  
  517.  
  518.  
  519.                                 SIGNAL DESCRIPTIONS
  520.             
  521.            _______________________________________________________________
  522.            |                                                             |
  523.                       CTS    Clear To Send     The other device will
  524.            |                                                             |
  525.                                                accept a transmission.
  526.            |                                                             |
  527.                       DSR    Data Set Ready    The other device
  528.            |                                                             |
  529.                                                is enabled.
  530.            |                                                             |
  531.                       RI     Ring Indicator    Usually reserved
  532.            |                                                             |
  533.                                                for modems only. The
  534.            |                                                             |
  535.                                                phone is ringing
  536.            |                                                             |
  537.                       DCD    Carrier Detect    Usually reserved for
  538.            |                                                             |
  539.                                                modems. The other modem's
  540.            |                                                             |
  541.                                                 carrier signal was
  542.            |                                                             |
  543.                                                detected.
  544.            |                                                             |
  545.            _______________________________________________________________
  546.            |                                                             |
  547.  
  548.             The header file for the LiteComm ToolBox contains the
  549.             various bit masks required for you to make use of the
  550.             information provided by the 8250 UART.
  551.  
  552.  
  553.  
  554.             TOOLBOX NOTES AND WARNINGS
  555.             TOOLBOX NOTES AND WARNINGS
  556.             __________________________
  557.  
  558.  
  559.             Before you can send or receive information on a serial port
  560.             using the ToolBox, you must use the open function to enable
  561.             the line. This function initializes the 8250 UART with the
  562.             correct parameters, and introduces the UART into the
  563.             interrupt structure of the PC. The ToolBox will detect, and
  564.             report, any errors that you may make in selecting the port
  565.             or specifying the initial parameters. The ToolBox cannot and
  566.             will not detect an attempt to open a non-existent serial
  567.             port.
  568.  
  569.  
  570.  
  571.                                        Page 8
  572.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  573.  
  574.  
  575.  
  576.  
  577.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  578.                              for Microsoft and Turbo C
  579.  
  580.             The ToolBox interfaces directly with the interrupt structure
  581.             of the PC. It is critical that, before exiting a program
  582.             that has opened a serial port that the serial port is closed
  583.             with the close function. If you exit your program without
  584.             closing the port, you may cause your system to crash since
  585.             the interrupt vector for the port might point to a section
  586.             of memory that no longer contains the needed code to support
  587.             the interrupt.  As an alternative, some C compilers provide
  588.             a function that permits you to introduce your own routines
  589.             into the normal exit() processing.  Since each of these
  590.             schemes has different requirements, we suggest that you
  591.             consult your compiler's documentation.
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.                                        Page 9
  638.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  639.  
  640.  
  641.  
  642.  
  643.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  644.                              for Microsoft and Turbo C
  645.  
  646.             Failure of the open function can be the result of either
  647.             improper parameters to the open function, or insufficient
  648.             memory available to allocate the requested buffers and
  649.             related control structures for the port. Memory for the
  650.             transmit and receive buffers as well as the port control
  651.             block are allocated from free memory. It is your
  652.             responsibility to insure that adequate memory is available
  653.             for this purpose.
  654.  
  655.  
  656.             Unless you are very familiar with the interrupt structure of
  657.             the PC, do not attempt to manipulate the interrupt enable
  658.             flag outside of the ToolBox. The ToolBox sets and clears the
  659.             interrupt enable flag at appropriate times and assumes that
  660.             it has sole control over the flag.
  661.  
  662.  
  663.             Unless otherwise specified, all library functions have been
  664.             compiled with the default structure alignment, i.e. the
  665.             structure alignment switch has not been used in creating the
  666.             ToolBox library.
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.                                       Page 10
  704.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  705.  
  706.  
  707.  
  708.  
  709.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  710.                              for Microsoft and Turbo C
  711.  
  712.                                    RECENT CHANGES
  713.                                    RECENT CHANGES
  714.                                    ______________
  715.  
  716.  
  717.             NEW IN VERSION 2.XX
  718.             NEW IN VERSION 2.XX
  719.             ___________________
  720.  
  721.  
  722.             With version 2.0 of LiteComm, we added several new functions
  723.             and made available, to registered users,the xmodem engine
  724.             promised when LiteComm was first released.
  725.  
  726.  
  727.             Version 2.1 of LiteComm further expanded upon COM3 and COM4
  728.             support by supporting interrupt chaining, permitting COM3
  729.             and COM4 to augment, rather than replace, existing
  730.             interrupts.
  731.  
  732.  
  733.             Version 2.12 was a maintenance release, and did not
  734.             incorporate any new functionality. It was discovered, during
  735.             the development of the Windowed XModem engine that there was
  736.             a bug in the automatic XON-XOFF feature which could cause
  737.             the transmit buffer to overflow under some circumstances.
  738.             Version 2.12 corrected this problem.
  739.  
  740.  
  741.             Several user-reported bugs were also corrected in 2.12.Our
  742.             thanks to Jerry Wasinger for his reports of several of these
  743.             problems.  We also want to thank Jerry for his providing an
  744.             alternate approach to handling the transmission of BREAK
  745.             characters (see the lc_sbrk function).With Jerry's
  746.             permission, we have based an alternate function on some of
  747.             his efforts.
  748.  
  749.  
  750.             With version 2.20, we introduced the second of out protocol
  751.             engines, this one for the increasingly-popular Windowed
  752.             XMODEM.  As with LXM, LWXM (LiteComm Windowed XModem) is
  753.             available to LiteComm registrants only.
  754.  
  755.  
  756.             Version 2.50 marks the beginning of support for Microsoft
  757.             C,version 5.0 and QuickC.  In version 2.5 of the ToolBox,
  758.             the original lc_sbrk function as been removed and only
  759.             lc_sbrk2 is supported. For the sake of compatibility with
  760.             previous versions, lc_sbrk2 has been renamed to lc_sbrk.
  761.             Version 2.50 also includes a new function, lc_ocnt that
  762.             returns the number of characters in the output buffer.
  763.  
  764.  
  765.             Version 2.60 corrects a bug in the lc_gets function that has
  766.             gone undetected since version 1.0.  The bug was such that
  767.             the function would repeatedly return the same characters,
  768.             unless the requested number of characters forced a buffer
  769.             wrap-around to occur.
  770.  
  771.  
  772.  
  773.                                       Page 11
  774.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  775.  
  776.  
  777.  
  778.  
  779.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  780.                              for Microsoft and Turbo C
  781.  
  782.             Version 2.60 also enhances the capabilities of the XModem
  783.             protocol engine, adding YModem support for further
  784.             efficiency.
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.                                       Page 12
  840.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  841.  
  842.  
  843.  
  844.  
  845.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  846.                              for Microsoft and Turbo C
  847.  
  848.             NEW IN VERSION 3.00
  849.             NEW IN VERSION 3.00
  850.             ___________________
  851.  
  852.  
  853.             Version 3.00 incorporates changes in several areas.  It is
  854.             with regret that, due to a lack of interest, we have been
  855.             forced to drop support for the Datalight C compiler.  While
  856.             we feel that Datalight offers a superior product at an
  857.             affordable price, the lack of registrants for this version
  858.             do not justify the continued support.
  859.  
  860.  
  861.             Additional effort has been spent on further tightening the
  862.             kernel code to improve the ability of LiteComm to handle
  863.             higher baud rates.  Our tests indicate that sustained speeds
  864.             of 38.4 Kbaud should be practical.  And for added
  865.             flexibility, we have made the Baud parameter used in the
  866.             comm_opn and comm_setup functions infinitely variable.
  867.             There is no longer the need to use the defined constants in
  868.             the litecomm.h header file.  Please note that to achieve
  869.             these peformance improvements that the litecomm.h file has
  870.             changed, requiring that you re-compile and relink any
  871.             existing applications.
  872.  
  873.  
  874.             We have added a function that should be of use to those of
  875.             you that have a need to DETECT when a break signal has been
  876.             received.  See the documentation for lc_gotbrk, found in the
  877.             section dealing with lc_sbrk.
  878.  
  879.  
  880.             As the result of questions and difficulty for users in
  881.             dealing with the lc_mstat function, the way in which the
  882.             function operates has been substantially altered.
  883.  
  884.  
  885.             Version 3.00 also corrects a bug that was recently detected
  886.             in the lch_sreg function.  The bug caused the intended value
  887.             to be ignored, and the value of the register was being set
  888.             to the register number itself.  Our apologies for this
  889.             oversight.
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.                                       Page 13
  908.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  909.  
  910.  
  911.  
  912.  
  913.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  914.                              for Microsoft and Turbo C
  915.  
  916.                                     BEYOND COM2
  917.                                     BEYOND COM2
  918.                                     ___________
  919.  
  920.  
  921.             THE TOOLBOX METHODOLOGY
  922.             THE TOOLBOX METHODOLOGY
  923.             _______________________
  924.  
  925.  
  926.             In the design of the original PC, and in subsequent
  927.             variations such as the PC/AT, there were only provision for
  928.             two serial ports. Many manufacturers of add-in products,
  929.             both serial ports and internal modems have added the
  930.             capability to support 1 or more additional ports beyond the
  931.             COM2 limit. Generally, this can cause problems in the PC
  932.             since there is no room in the interrupt request scheme for
  933.             additional levels of interrupts, and there are no designated
  934.             interrupt vector for other additional ports.
  935.  
  936.  
  937.             The ToolBox approach to resolving these issues is to permit
  938.             the programmer a degree of control over the parameters that
  939.             govern the interrupt mechanism for COM3 and COM4.
  940.             Specifically, these parameters are: 1) the interrupt request
  941.             (IRQ) bit that is used to mask the 8259 interrupt
  942.             controller; 2) the interrupt vector number (not address) to
  943.             which the port is attached; and 3) the base i/o register for
  944.             the port itself. Of course, it is assumed that the port is
  945.             based upon the 8250 UART or compatible device.
  946.  
  947.  
  948.             Before you attempt to use COM3 and/or COM4, you must
  949.             determine from the port's documentation, the appropriate
  950.             values for these three parameters. As distributed, the
  951.             ToolBox assumes the following:
  952.  
  953.             
  954.             
  955.                                   COM3        COM4
  956.                                   ____        ____
  957.             
  958.                       IRQ Bit      4           3
  959.                       Vector #    0Ch         0Bh
  960.                       Base Reg    3E8h        2E8h
  961.  
  962.             You may change any or all of these values by using the
  963.             _portchg function described below, but only before you open
  964.             the port with comm_opn. Once the port has been opened,
  965.             _portchg is ineffective, and _portchg will not work on COM1
  966.             or COM2.
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.                                       Page 14
  979.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  980.  
  981.  
  982.  
  983.  
  984.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  985.                              for Microsoft and Turbo C
  986.  
  987.             CAUTIONS
  988.             CAUTIONS
  989.             ________
  990.  
  991.  
  992.             There is an intimate relationship between the IRQ setting
  993.             and the interrupt vector to which it relates. In the PC,
  994.             this relationship is controlled, in part, by the 8259
  995.             interrupt controller that is set during BIOS initialization.
  996.  
  997.  
  998.             In brief, the BIOS settings for the PC (and most close
  999.             compatibles) establish IRQ0 as being vector number 08h, and
  1000.             subsequent IRQ levels at increasing vector numbers. These
  1001.             vector numbers (or types in INTEL terms) act as a cpu-
  1002.             directed call table to locations in the lowest 1K of system
  1003.             memory. We can alter how the system responds to a given
  1004.             interrupt by replacing or changing the values in the
  1005.             associated vector position to point to a routine which we
  1006.             supply.
  1007.  
  1008.  
  1009.             COM3 and COM4 share two critical parameters with COM1 and
  1010.             COM2 respectively, the IRQ bit and the interrupt vector
  1011.             number. If you intend to use COM1 with COM3 or COM2 with
  1012.             COM4 simultaneously, you must change the BOTH the vector
  1013.             number and the IRQ for COM3 or COM4 to an unused or un-
  1014.             needed vector. The ability for your add-on ports to handle
  1015.             such a change is highly hardware dependent, so check your
  1016.             port's documentation carefully. Failure to do so will result
  1017.             in loss of data at best, and a system lockup at worst.
  1018.  
  1019.  
  1020.             Judging from the questions asked by some users of LiteComm,
  1021.             there is evidently some mis-understanding about using ports
  1022.             beyond COM2, and how this all relates to your hardware.
  1023.             Before you can successfully use COM3 or COM4, you must
  1024.             consider the following:
  1025.  
  1026.  
  1027.  
  1028.                 1. Does the hardware permit a change to the base
  1029.                    port and/or the interrupt vector to which the
  1030.                    port responds.  Some expansion cards will
  1031.                    support changing one and not the other, giving
  1032.                    rise to potential hardware conflicts and lost
  1033.                    data.
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.                                       Page 15
  1047.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1048.  
  1049.  
  1050.  
  1051.  
  1052.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1053.                              for Microsoft and Turbo C
  1054.  
  1055.                 2. Does the hardware permit  re-assignment of the
  1056.                    IRQ priority. Some expansion cards permit you to
  1057.                    alter the IRQ priority, some won't. Suffice it
  1058.                    to say from the previous discussion the any
  1059.                    change to the IRQ priority must allow a
  1060.                    corresponding change to the interrupt vector
  1061.                    number. Without this capability, reprogramming
  1062.                    of the 8259 chip would be required.
  1063.  
  1064.  
  1065.                 3. In fact, many add-on cards permit this dual
  1066.                    change simply by making a single switch or
  1067.                    jumper setting. Unfortunately, the documentation
  1068.                    for these cards  generally assume that you are
  1069.                    aware of the dual nature of the IRQ vector
  1070.                    relationship, and may leave you with the
  1071.                    impression that you are changing one and not the
  1072.                    other. In most circumstances, this is not the
  1073.                    case.
  1074.  
  1075.             The point to all of this is that LiteComm can only provide
  1076.             as much support as the hardware permits, or is capable of
  1077.             responding to. If you wish to use other than the default
  1078.             base port, interrupt vector, or irq priority for COM3 or
  1079.             COM4, then your expansion card must be capable of supporting
  1080.             the new values; in other words, these values are all
  1081.             hardware-provided, and are recognized by the LiteComm
  1082.             software. If your hardware does not permit changing a value,
  1083.             LiteComm cannot improve the situation.
  1084.  
  1085.  
  1086.             We should, at this point, add one final caution about how
  1087.             interrupt priorities function, and their relationship to the
  1088.             irq bit the you may select. The standard PC permits 8
  1089.             interrupt priority levels, with the programmable timer
  1090.             having the highest priority, and the parallel printer port
  1091.             having the lowest priority. When an interrupt occurs, the
  1092.             interrupt controller (8259 chip) masks out all other
  1093.             interrupts from the priority of the interrupting device and
  1094.             all lower priority devices.
  1095.  
  1096.  
  1097.             As an aid to making COM3 and COM4 "fit", LiteComm supports
  1098.             interrupt chaining for the COM3 and COM4 ports. If you use
  1099.             COM3 or COM4, when an interrupt occurs, the kernel will
  1100.             attempt to determine if the interrupt was caused by the
  1101.             supported port or from some other source.
  1102.  
  1103.  
  1104.             If the kernel determines that the supported port did not
  1105.             cause the interrupt, an automatic chain to the original
  1106.             interrupt handler for that interrupt level (IRQ level) will
  1107.             take place, allowing you to "patch in" or share the
  1108.             available interrupt vectors.
  1109.  
  1110.  
  1111.  
  1112.                                       Page 16
  1113.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1114.  
  1115.  
  1116.  
  1117.  
  1118.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1119.                              for Microsoft and Turbo C
  1120.  
  1121.             If you intend to use other than the library-provided
  1122.             defaults, be sure that you understand the interrupt
  1123.             mechanism. The use of the automatic chaining described above
  1124.             can be particularly troublesome under some circumstances,
  1125.             resulting in loss of interrupts and, potentially, a system
  1126.             crash.
  1127.  
  1128.  
  1129.             DO NOT attempt to mix the ToolBox functions with other
  1130.             seemingly-related functions (such as the BIOS calls provided
  1131.             in both Turbo and Microsoft C).  At least two users have
  1132.             attempted to only use the receive-portions of LiteComm,
  1133.             while resorting to the BIOS functions to send characters.
  1134.             The result at best has been failure of the user's
  1135.             application to function, and, at worst, total system
  1136.             lockups.  This mix of functions is NOT supported and must
  1137.             not be used.  If you attempt such a mix, we cannot help you.
  1138.  
  1139.  
  1140.             One final caution is in order.  One or two users have
  1141.             attempted to trace through the interrupts as they occur
  1142.             using debuggers.  This is a risky proposition at best since
  1143.             most debuggers work by tapping into, and disturbing, the
  1144.             interrupt mechanism.  If you feel you must use a debugger,
  1145.             try to stay away from the kernel routines of LiteComm, or
  1146.             use a hardware-based debugger such as Periscope.
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.                                       Page 17
  1179.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1180.  
  1181.  
  1182.  
  1183.  
  1184.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1185.                              for Microsoft and Turbo C
  1186.  
  1187.                                   PACKAGE CONTENTS
  1188.                                   PACKAGE CONTENTS
  1189.                                   ________________
  1190.  
  1191.             Your distribution diskette contains several files that are
  1192.             important to you. All distribution diskettes, at a minimum,
  1193.             include the following files in the diskette's root
  1194.             directory:
  1195.  
  1196.             
  1197.             .fo off
  1198.                    LSERIAL.NUM       SERIAL NUMBER OF THIS COPY
  1199.                    READ.ME           LATEST INFORMATION ABOUT LITECOMM
  1200.             
  1201.                    TCOMM.ARC         SHAREWARE VERSION AND DOCUMENTATION
  1202.                                      FILES - TURBO C VERSION
  1203.             
  1204.                    MCOMM.ARC         SHAREWARE VERSION AND DOCUMENTATION
  1205.                                      FILES - MICROSOFT C VERSION
  1206.             
  1207.                    TCLIB.ARC         ALL MODEL LIBRARIES FOR TURBO C
  1208.             
  1209.                    MSCLIB.ARC        ALL MODEL LIBRARIES FOR MICROSOFT C
  1210.  
  1211.             If you registered for the source code modules, the diskette
  1212.             contains a sub directory called SOURCE.  The SOURCE
  1213.             directory contains 2 source code archives, as well as
  1214.             several compiler specific archives.
  1215.  
  1216.             
  1217.             
  1218.                    LITECOMM SOURCE CODE       LCSRC.ARC
  1219.             
  1220.                    XMODEM ENGINE SOURCE CODE  LXMSRC.ARC
  1221.             
  1222.                    COMPILER SPECIFIC FILES    MSC.ARC
  1223.                                               TURBOC.ARC
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.                                       Page 18
  1247.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1248.  
  1249.  
  1250.  
  1251.  
  1252.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1253.                              for Microsoft and Turbo C
  1254.  
  1255.                            COMPILER-SPECIFIC INSTRUCTIONS
  1256.                            COMPILER-SPECIFIC INSTRUCTIONS
  1257.                            ______________________________
  1258.  
  1259.  
  1260.             INSTALLING THE TURBO C VERSION
  1261.             INSTALLING THE TURBO C VERSION
  1262.             ______________________________
  1263.  
  1264.  
  1265.             In the following discussion, we assume that your regular
  1266.             ________________________________________________________
  1267.             Turbo header files are contained in a directory called
  1268.             ______________________________________________________
  1269.             \TC\INCLUDE, and that your Turbo libraries are in a
  1270.             \TC\INCLUDE                                        
  1271.             ___________________________________________________
  1272.             directory called \TC\LIB, as recommended by Borland.
  1273.                              \TC\LIB                            
  1274.             ____________________________________________________
  1275.  
  1276.  
  1277.             To install the header files used with LiteComm, perform the
  1278.             following steps:
  1279.  
  1280.  
  1281.  
  1282.                 1. CD \TC\INCLUDE
  1283.  
  1284.  
  1285.                 2. ARC E A:TCOMM *.H
  1286.  
  1287.  
  1288.                 3. ARC E A:TCLIB *.H
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.                                       Page 19
  1323.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1324.  
  1325.  
  1326.  
  1327.  
  1328.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1329.                              for Microsoft and Turbo C
  1330.  
  1331.             To install the library files, perform the following steps:
  1332.  
  1333.  
  1334.  
  1335.                 1. CD \TC\LIB
  1336.  
  1337.  
  1338.                 2. ARC E A:TCLIB *.LIB
  1339.  
  1340.             If you are installing only the libraries, this completes the
  1341.             installation procedure for Turbo C. If you have registered
  1342.             for the package's source code, we recommend that you create
  1343.             two subdirectories named COMM and PROTO to hold the LiteComm
  1344.             and XModem source code respectively. To install the LiteComm
  1345.             source code, do the following:
  1346.  
  1347.  
  1348.  
  1349.                 1. MD \COMM
  1350.  
  1351.  
  1352.                 2. CD \COMM
  1353.  
  1354.  
  1355.                 3. ARC E A:LCSRC *.*
  1356.  
  1357.             To install the XModem source code, do the following:
  1358.  
  1359.  
  1360.  
  1361.                 1. MD \PROTO
  1362.  
  1363.  
  1364.                 2. CD \PROTO
  1365.  
  1366.  
  1367.                 3. ARC E A:LXMSRC *.*
  1368.  
  1369.             We strongly urge that you use the recommended approach in
  1370.             handling the source code to avoid naming conflicts that
  1371.             might arise.
  1372.  
  1373.  
  1374.             It is important to source code registrants to be aware that
  1375.             to successfully rebuild the LiteComm or XModem libraries,
  1376.             the supplied make files assume that you are using Turbo-C
  1377.             version 1.5, and therefore have access to the TLIB program
  1378.             that is a part of Version 1.5.  If you are using version 1.0
  1379.             of Turbo-C, you must have access to LIB.EXE, the MicroSoft
  1380.             Librarian program, or a suitable replacement. To use the
  1381.             make files included in the package under these
  1382.             circumstances, you will have to change the make files
  1383.             accordingly to refer to LIB rather than TLIB.
  1384.  
  1385.  
  1386.  
  1387.  
  1388.                                       Page 20
  1389.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1390.  
  1391.  
  1392.  
  1393.  
  1394.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1395.                              for Microsoft and Turbo C
  1396.  
  1397.             Turbo C users must also be aware of several additional
  1398.             facts. One module, ichain, is written in assembly code.To
  1399.             reassemble this module, you must have access to MicroSoft
  1400.             MASM, Version 5.0 or greater. The object version of ichain
  1401.             is in the TURBOC.ARC file.
  1402.  
  1403.  
  1404.             When you specify the use of the LiteComm and XModem Engine
  1405.             libraries in Turbo C, you must fully qualify the library
  1406.             name in your .PRJ file, even if you have specified the
  1407.             default library directory in the TC Option. The library
  1408.             option tells TC how to look for the standard Turbo C
  1409.             libraries, but not any user-provided libraries.
  1410.  
  1411.  
  1412.  
  1413.             INSTALLING THE MICROSOFT C VERSION
  1414.             INSTALLING THE MICROSOFT C VERSION
  1415.             __________________________________
  1416.  
  1417.  
  1418.             In the following discussion, we assume that your regular
  1419.             ________________________________________________________
  1420.             header files are contained in a sub-directory called
  1421.             ____________________________________________________
  1422.             INCLUDE, and that your libraries are in a sub-directory
  1423.             INCLUDE                                                
  1424.             _______________________________________________________
  1425.             called LIB, as recommended by Microsoft. These instructions
  1426.                    LIB                                                 
  1427.             ___________________________________________________________
  1428.             pertain to both Microsoft QuickC and standard C.
  1429.             ________________________________________________
  1430.  
  1431.  
  1432.             To install the header files used with LiteComm, perform the
  1433.             following steps:
  1434.  
  1435.  
  1436.  
  1437.                 1. CD INCLUDE
  1438.  
  1439.  
  1440.                 2. ARC E A:MCOMM *.H
  1441.  
  1442.  
  1443.                 3. ARC E A:MCLIB *.H
  1444.  
  1445.             To install the library files, perform the following steps:
  1446.  
  1447.  
  1448.  
  1449.                 1. CD LIB
  1450.  
  1451.  
  1452.                 2. ARC E A:MCLIB *.LIB
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.                                       Page 21
  1464.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1465.  
  1466.  
  1467.  
  1468.  
  1469.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1470.                              for Microsoft and Turbo C
  1471.  
  1472.             If you are installing only the libraries, this completes the
  1473.             installation procedure for Microsoft C. If you have
  1474.             registered for the package's source code, we recommend that
  1475.             you create two subdirectories named COMM and PROTO to hold
  1476.             the LiteComm and XModem source code respectively. To install
  1477.             the LiteComm source code, do the following:
  1478.  
  1479.  
  1480.  
  1481.                 1. MD COMM
  1482.  
  1483.  
  1484.                 2. CD COMM
  1485.  
  1486.  
  1487.                 3. ARC E A:LCSRC *.*
  1488.  
  1489.             To install the XModem source code, do the following:
  1490.  
  1491.  
  1492.  
  1493.                 1. MD PROTO
  1494.  
  1495.  
  1496.                 2. CD PROTO
  1497.  
  1498.  
  1499.                 3. ARC E A:LXMSRC *.*
  1500.  
  1501.             We strongly urge that you use the recommended approach in
  1502.             handling the source code to avoid naming conflicts that
  1503.             might arise.
  1504.  
  1505.  
  1506.             It is important to source code registrants to be aware that
  1507.             to successfully rebuild the LiteComm or XModem libraries,
  1508.             you must have access to a copy of LIB.EXE, the MicroSoft
  1509.             Librarian program, or a suitable replacement. To use the
  1510.             make files included in the package, LIB.EXE must either be
  1511.             in your current working directory, or in a directory
  1512.             specified in the DOS PATH variable. For additional
  1513.             information on setting the PATH variable, consult your DOS
  1514.             manual.
  1515.  
  1516.  
  1517.             Microsoft C users need to know that the Microsoft C  version
  1518.             is written in, and intended to support Microsoft C version
  1519.             5.0 and QuickC.  The package has not been tested with
  1520.             earlier versions of Microsoft C.
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.                                       Page 22
  1530.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1531.  
  1532.  
  1533.  
  1534.  
  1535.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1536.                              for Microsoft and Turbo C
  1537.  
  1538.             QuickC also note that we have NOT provided a QLB version of
  1539.             the libraries.  If you wish to create a QLB version of the
  1540.             libraries for use in the QuickC environment, follow the
  1541.             procedures outlined on pages 237-ff of the QuickC
  1542.             Programmer's Guide.  Remember, the QuickC environment
  1543.             requires the MEDIUM memory model.  Therefore, unregistered
  1544.             users cannot create a useable QLB library following this
  1545.             procedure.  Alternatively, you can use the supplied medium
  1546.             model library within the QuickC environment by specifying
  1547.             the library as part of a program list.
  1548.  
  1549.  
  1550.             Unregistered QuickC users can still use QCL to create
  1551.             useable programs with the supplied small model library.  Be
  1552.             sure to use the /AS switch when compiling.
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.                                       Page 23
  1596.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1597.  
  1598.  
  1599.  
  1600.  
  1601.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1602.                              for Microsoft and Turbo C
  1603.  
  1604.                                    GENERAL NOTES
  1605.                                    GENERAL NOTES
  1606.                                    _____________
  1607.  
  1608.             The LiteComm and related libraries make extensive use of
  1609.             parameters defined in the included header files. Where
  1610.             appropriate, your programs should always use the same header
  1611.             file parameters. While every effort will be made in future
  1612.             releases of LiteComm to preserve the values as currently
  1613.             provided, we cannot guarantee that changes will never
  1614.             occur.The safest way to safeguard your efforts is to use the
  1615.             defined parameters. In this way, a simple recompile and
  1616.             relink will insure consistency from one release of LiteComm
  1617.             to the next.
  1618.  
  1619.  
  1620.             In the discussion of the various functions which follow, you
  1621.             should assume that any references to the port variable refer
  1622.             to a variable or constant that may take on a value of from 1
  1623.             to 4. No other values are acceptable, and will be rejected.
  1624.  
  1625.  
  1626.             While we feel that LiteComm is written in the most efficient
  1627.             way possible, commensurate with good programming practice,
  1628.             we cannot be responsible for variations caused by hardware
  1629.             configurations or other factors beyond our control. LiteComm
  1630.             has been tested, and is known to perform on, the IBM PC-AT
  1631.             and several compatible systems such as the Zenith and Wyse
  1632.             equivalents. LiteComm has not been tested in environments in
  1633.             which other software, most significantly TSR (terminate and
  1634.             stay resident) modules exist. Some TSR programs that "steal"
  1635.             interrupts for their own purposes present an unfavorable
  1636.             environment to other programs that rely on the interrupt
  1637.             structure of the computer.
  1638.  
  1639.  
  1640.             Should you experience erratic behavior with LiteComm in a
  1641.             TSR-type situation, try executing your application without
  1642.             the TSR module being present. If the problems you have
  1643.             experienced disappear, suspect the TSR module.
  1644.  
  1645.  
  1646.             Conversely, LiteComm provides an excellent vehicle for
  1647.             supporting TSR programs that you may write. Since the
  1648.             package is fully reentrant, your only concern need be with
  1649.             those aspects of TSR programs are of normal concern, e.g.
  1650.             the non-reentrant nature of DOS. LiteComm never uses DOS
  1651.             functions and may therefore be safely used in a TSR
  1652.             environment.
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.                                       Page 24
  1664.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1665.  
  1666.  
  1667.  
  1668.  
  1669.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1670.                              for Microsoft and Turbo C
  1671.  
  1672.             Several users have reported problems in consistently
  1673.             detecting a ringing telephone by checking the state of the
  1674.             RI (Ring Indicator) signal.  The problem seems to be highly
  1675.             dependant on the type of modem that is being used, since
  1676.             this signal is provided by the modem.  If the duration of
  1677.             the signal is too short, the program may miss the signal as
  1678.             the modem toggles it on and off.  One workaround that seems
  1679.             to be satisfactory is to check the RICHG bit returned from
  1680.             lc_mstat, rather than the RI bit.  The RICHG bit will be set
  1681.             when the RI bit comes one and again when the RI bit goes
  1682.             off.
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.                                       Page 25
  1730.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1731.  
  1732.  
  1733.  
  1734.  
  1735.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1736.                              for Microsoft and Turbo C
  1737.  
  1738.                                  FUNCTION REFERENCE
  1739.                                  FUNCTION REFERENCE
  1740.                                  __________________
  1741.  
  1742.             In the following pages, we provide the detailed information
  1743.             about each of the available LiteComm ToolBox functions.
  1744.             Each function definition includes, at a minimum, a summary
  1745.             of how the function is referenced, a description of what the
  1746.             function does, and an indication of those values, if any,
  1747.             that the function might perform.
  1748.  
  1749.  
  1750.             Where appropriate, we include additional documentation about
  1751.             the function.  Some definitions include examples, in the
  1752.             sense of code fragments illustrating the function's usage.
  1753.             More importantly, some definitions include additional notes
  1754.             and warnings as well as references to other functions within
  1755.             the package.
  1756.  
  1757.  
  1758.             We have made every effort to insure that the documentation
  1759.             of the functions is complete and accurate.  The style and
  1760.             manner of the documentation assumes that the reader is
  1761.             thoroughly familiar with the elements of C syntax and common
  1762.             conventions.
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.                                       Page 26
  1798.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1799.  
  1800.  
  1801.  
  1802.  
  1803.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1804.                              for Microsoft and Turbo C
  1805.  
  1806.            _______________________________________________________________
  1807.  
  1808.                                       _portchg
  1809.                                        portchg
  1810.            _______________________________________________________________
  1811.  
  1812.  
  1813.             SUMMARY
  1814.             SUMMARY
  1815.             _______
  1816.  
  1817.                  #include <litecomm.h>
  1818.                  
  1819.                  int _portchg(port, base, irq, vector)
  1820.                  
  1821.                       unsigned port;
  1822.                       unsigned base;
  1823.                       unsigned vector;
  1824.                       char irq;
  1825.  
  1826.  
  1827.             DESCRIPTION
  1828.             DESCRIPTION
  1829.             ___________
  1830.  
  1831.             Changes one or more of the critical parameters for COM3 or
  1832.             COM4. This function must be used before the port is opened
  1833.             to be effective. To leave any of the parameters at its
  1834.             default value, make the corresponding entry 0. Note that
  1835.             vector is a vector number, not an address or pointer.
  1836.  
  1837.  
  1838.             The irq parameter should not be taken to be the irq
  1839.             (interrupt request number, but rather the irq mask. The
  1840.             following lines, reproduced from 'litecomm.h' help
  1841.             illustrate this idea.
  1842.  
  1843.  
  1844.                  #define IRQ1 0x10 /* int req mask for port 1 -
  1845.                  irq4 */
  1846.                  #define IRQ2 0x08 /* int req mask for port 2 -
  1847.                  irq3 */
  1848.  
  1849.             Note that the value for irq4 is NOT 4, but a character in
  1850.             which bit 4, using INTEL's bit numbering, is set to a value
  1851.             of 1. Thus, to use irq priority 1 as the irq for either COM3
  1852.             or COM4, you would specify 0x02 as the value of irq when
  1853.             calling _portchg.
  1854.  
  1855.  
  1856.             The default parameters are shown in the litecomm.h include
  1857.             file.
  1858.  
  1859.  
  1860.             If you intend to change the default irq settings, you MUST
  1861.             also make a corresponding change to the vector number. See
  1862.             the accompanying documentation about using COM3 and COM4 for
  1863.             additional details. Failure to follow this rule may make the
  1864.             port appear to be non-functional.
  1865.  
  1866.  
  1867.  
  1868.  
  1869.                                       Page 27
  1870.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1871.  
  1872.  
  1873.  
  1874.  
  1875.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1876.                              for Microsoft and Turbo C
  1877.  
  1878.             The _portchg function does NOT check to determine that you
  1879.             have provided both an IRQ mask AND a new vector number.
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.                                       Page 28
  1936.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  1937.  
  1938.  
  1939.  
  1940.  
  1941.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  1942.                              for Microsoft and Turbo C
  1943.  
  1944.             EXAMPLE
  1945.             EXAMPLE
  1946.             _______
  1947.  
  1948.                   if (_portchg(port, 0x408, 0, 0, 0) == -1)
  1949.                   {
  1950.                       printf("Error Changing Port %d\n", port);
  1951.                       exit(1);
  1952.                   }
  1953.  
  1954.  
  1955.             RETURN VALUES
  1956.             RETURN VALUES
  1957.             _____________
  1958.  
  1959.             Returns 0 if the function is successful, -1 if you attempt
  1960.             to change a port other that 3 or 4.
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.                                       Page 29
  2006.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2007.  
  2008.  
  2009.  
  2010.  
  2011.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2012.                              for Microsoft and Turbo C
  2013.  
  2014.            _______________________________________________________________
  2015.  
  2016.                                       comm_opn
  2017.                                       comm_opn
  2018.            _______________________________________________________________
  2019.  
  2020.  
  2021.             SUMMARY
  2022.             SUMMARY
  2023.             _______
  2024.  
  2025.                  #include <litecomm.h>
  2026.                  
  2027.                  int comm_opn(port, baud, parity, datab, stopb,
  2028.                  inbufsz, outbufsz)
  2029.                       unsigned port;
  2030.                       unsigned baud;
  2031.                       unsigned parity;
  2032.                       unsigned datab;
  2033.                       unsigned stopb;
  2034.                       unsigned inbufsz;
  2035.                       unsigned outbufsz;
  2036.  
  2037.  
  2038.             DESCRIPTION
  2039.             DESCRIPTION
  2040.             ___________
  2041.  
  2042.             Opens the specified port for use and attaches an interrupt
  2043.             handler to DOS for the port. The function allocates buffers
  2044.             for input and output of the specified sizes, and sets the
  2045.             port to the parameters specified. The minimum value for
  2046.             inbufsz is 128; the minimum size for outbufsz is 64. A port
  2047.             opened in this manner must be closed using comm_close before
  2048.             program termination to avoid the possibility of a system
  2049.             crash.
  2050.  
  2051.  
  2052.             The baud parameter is an unsigned integer that specifies the
  2053.             baud rate you intend to use, e.g. 4800. The other parameters
  2054.             passed to the function should be from the parameter set in
  2055.             the litecomm.h include file.
  2056.  
  2057.  
  2058.  
  2059.             EXAMPLE
  2060.             EXAMPLE
  2061.             _______
  2062.  
  2063.                   if (comm_opn(port, 1200, NPARITY, BIT8, STOP1,
  2064.                  256, 256) == -1)
  2065.                  {
  2066.                       printf("Error Opening Port %d\n", port);
  2067.                       exit(1);
  2068.                  }
  2069.  
  2070.  
  2071.             RETURN VALUES
  2072.             RETURN VALUES
  2073.             _____________
  2074.  
  2075.             Upon successful open, the function returns port. If any
  2076.             error occurs, regardless of type, the function returns -1.
  2077.  
  2078.  
  2079.  
  2080.  
  2081.                                       Page 30
  2082.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2083.  
  2084.  
  2085.  
  2086.  
  2087.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2088.                              for Microsoft and Turbo C
  2089.  
  2090.            _______________________________________________________________
  2091.  
  2092.                                      comm_close
  2093.            _______________________________________________________________
  2094.  
  2095.  
  2096.             SUMMARY
  2097.             SUMMARY
  2098.             _______
  2099.  
  2100.                  #include <litecomm.h>
  2101.                  int comm_close(port)
  2102.                  unsigned port;
  2103.  
  2104.  
  2105.             DESCRIPTION
  2106.             DESCRIPTION
  2107.             ___________
  2108.  
  2109.             This function is the companion to comm_opn and, in effect,
  2110.             performs the opposite action. Comm_close detaches the
  2111.             library routines from the interrupt handler, and reconnects
  2112.             the previous interrupt handler. Comm_close also release
  2113.             dynamically allocated member used for buffering and control
  2114.             structures. Failure to call comm_close before terminating a
  2115.             program may result in unexplained system crashes or hangs.
  2116.  
  2117.  
  2118.  
  2119.             RETURN VALUES
  2120.             RETURN VALUES
  2121.             _____________
  2122.  
  2123.             If any error occurs, regardless of type, the function
  2124.             returns -1.
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.                                       Page 31
  2155.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2156.  
  2157.  
  2158.  
  2159.  
  2160.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2161.                              for Microsoft and Turbo C
  2162.  
  2163.            _______________________________________________________________
  2164.  
  2165.                                      comm_setup
  2166.            _______________________________________________________________
  2167.  
  2168.  
  2169.             SUMMARY
  2170.             SUMMARY
  2171.             _______
  2172.  
  2173.                  #include <litecomm.h>
  2174.                  
  2175.                  int comm_setup(port,baud,parity,datab,stopb)
  2176.                  
  2177.                       unsigned port;
  2178.                       unsigned baud;
  2179.                       unsigned parity;
  2180.                       unsigned datab;
  2181.                       unsigned stopb;
  2182.  
  2183.  
  2184.             DESCRIPTION
  2185.             DESCRIPTION
  2186.             ___________
  2187.  
  2188.             The comm_setup function is a subset of the comm_opn function
  2189.             and the remarks made in the description of comm_opn apply.
  2190.             This function is useful if you wish to change the basic
  2191.             communication parameters of the specified port that has
  2192.             already been opened without comm_close'ing the port and
  2193.             breaking the telephone connection.
  2194.  
  2195.  
  2196.  
  2197.             EXAMPLE
  2198.             EXAMPLE
  2199.             _______
  2200.  
  2201.                  if (comm_setup(port, 1200, NPARITY, BIT8, STOP1)
  2202.                  == -1)
  2203.                  {
  2204.                       printf("Error Changing Port %d\n", port);
  2205.                       exit(1);
  2206.                  }
  2207.  
  2208.  
  2209.             RETURN VALUES
  2210.             RETURN VALUES
  2211.             _____________
  2212.  
  2213.             If any error occurs, regardless of type, the function
  2214.             returns -1.
  2215.  
  2216.  
  2217.  
  2218.             SEE ALSO
  2219.             SEE ALSO
  2220.             ________
  2221.                  comm_opn
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.                                       Page 32
  2232.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2233.  
  2234.  
  2235.  
  2236.  
  2237.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2238.                              for Microsoft and Turbo C
  2239.  
  2240.            _______________________________________________________________
  2241.  
  2242.                                       lc_vport
  2243.            _______________________________________________________________
  2244.  
  2245.  
  2246.             SUMMARY
  2247.             SUMMARY
  2248.             _______
  2249.  
  2250.                  #include <litecomm.h>
  2251.                  
  2252.                  COMM *lc_vport(port)
  2253.                  
  2254.                       unsigned port;
  2255.  
  2256.  
  2257.             DESCRIPTION
  2258.             DESCRIPTION
  2259.             ___________
  2260.  
  2261.             Used internally to validate that the port number specified
  2262.             is correct and has been opened with the comm_opn function.
  2263.             May be of use to you in writing certain applications.
  2264.  
  2265.  
  2266.  
  2267.             RETURN VALUES
  2268.             RETURN VALUES
  2269.             _____________
  2270.  
  2271.             If the port is valid and has been opened, returns a pointer
  2272.             to the control block for the port. Returns NULL if an error
  2273.             occurs;
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.                                       Page 33
  2305.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2306.  
  2307.  
  2308.  
  2309.  
  2310.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2311.                              for Microsoft and Turbo C
  2312.  
  2313.            _______________________________________________________________
  2314.  
  2315.                                       lc_icnt
  2316.            _______________________________________________________________
  2317.  
  2318.  
  2319.             SUMMARY
  2320.             SUMMARY
  2321.             _______
  2322.  
  2323.                  #include <litecomm.h>
  2324.                  
  2325.                  int lc_icnt(port)
  2326.                  int lc_ocnt(port)
  2327.                  
  2328.                       unsigned port;
  2329.  
  2330.  
  2331.             DESCRIPTION
  2332.             DESCRIPTION
  2333.             ___________
  2334.  
  2335.             May be used to determine the number of characters currently
  2336.             in the input(lc_icnt) or output(lc_ocnt) buffers for the
  2337.             port.
  2338.  
  2339.  
  2340.  
  2341.             RETURN VALUES
  2342.             RETURN VALUES
  2343.             _____________
  2344.  
  2345.             Both functions return -1 if an error occurs (port not open
  2346.             or invalid port number).The lc_icnt() function return the
  2347.             number of characters in the input buffer; lc_ocnt() returns
  2348.             the number of characters in the transmit buffer that have
  2349.             not been sent.
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.                                       Page 34
  2378.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2379.  
  2380.  
  2381.  
  2382.  
  2383.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2384.                              for Microsoft and Turbo C
  2385.  
  2386.            _______________________________________________________________
  2387.  
  2388.                                       lc_mstat
  2389.            _______________________________________________________________
  2390.  
  2391.  
  2392.             SUMMARY
  2393.             SUMMARY
  2394.             _______
  2395.  
  2396.                  #include <litecomm.h>
  2397.                  
  2398.                  int lc_mstat(port)
  2399.                  
  2400.                       unsigned port;
  2401.  
  2402.  
  2403.             DESCRIPTION
  2404.             DESCRIPTION
  2405.             ___________
  2406.  
  2407.             May be used to determine the last known state of the modem-
  2408.             supplied handshake signals. These may be tested using the
  2409.             values in the include'd litecomm.h file. The handshake
  2410.             signals consist of a byte in which the bits 4-7 contain the
  2411.             current state of the signals (such as Clear To Send or CTS)
  2412.             and bits 0-3 contain information regarding whether or not
  2413.             individual signals have changed.  lc_mstat always returns
  2414.             the current values of signals in bits 4-7.  Bits 0-3 will
  2415.             reflect which, if any, of the signals has changed.  The
  2416.             easiest approach to dealing with the returned value is to
  2417.             test bits 0-3 for a non-zero value.  If any non-zero value
  2418.             is returned, one or more signals have changed since the last
  2419.             call to lc_mstat.  NOTE: You should be aware that the bits
  2420.             0-3 are reset once this function is called.  The value
  2421.             obtained from bits 4-7 will correctly reflect the current
  2422.             state of the signals.
  2423.  
  2424.  
  2425.             To determine which signals, if any, have changed use the
  2426.             XXXCHG bits returned (see litecomm.h).
  2427.  
  2428.  
  2429.  
  2430.             RETURN VALUES
  2431.             RETURN VALUES
  2432.             _____________
  2433.  
  2434.             If the port is valid and has been opened, returns the
  2435.             current modem status bits. Returns -1 if an error occurs.
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.                                       Page 35
  2451.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2452.  
  2453.  
  2454.  
  2455.  
  2456.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2457.                              for Microsoft and Turbo C
  2458.  
  2459.            _______________________________________________________________
  2460.  
  2461.                                       lc_estat
  2462.            _______________________________________________________________
  2463.  
  2464.  
  2465.             SUMMARY
  2466.             SUMMARY
  2467.             _______
  2468.  
  2469.                  #include <litecomm.h>
  2470.                  
  2471.                  int lc_estat(port)
  2472.                  
  2473.                       unsigned port;
  2474.  
  2475.  
  2476.             DESCRIPTION
  2477.             DESCRIPTION
  2478.             ___________
  2479.  
  2480.             May be used to determine the last known state of the serial
  2481.             port's error status bits. These may be tested using the
  2482.             values in the include'd litecomm.h file.
  2483.  
  2484.  
  2485.  
  2486.             RETURN VALUES
  2487.             RETURN VALUES
  2488.             _____________
  2489.  
  2490.             If the port is valid and has been opened, returns the
  2491.             current error status bits. Returns -1 if an error occurs.
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.                                       Page 36
  2524.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2525.  
  2526.  
  2527.  
  2528.  
  2529.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2530.                              for Microsoft and Turbo C
  2531.  
  2532.            _______________________________________________________________
  2533.  
  2534.                                       lc_getw
  2535.            _______________________________________________________________
  2536.  
  2537.  
  2538.             SUMMARY
  2539.             SUMMARY
  2540.             _______
  2541.  
  2542.                  #include <litecomm.h>
  2543.                  
  2544.                  int lc_getw(port)
  2545.                  
  2546.                       unsigned port;
  2547.  
  2548.  
  2549.             DESCRIPTION
  2550.             DESCRIPTION
  2551.             ___________
  2552.  
  2553.             Read a character from the serial port's input buffer. Wait
  2554.             indefinitely until a character is available.
  2555.  
  2556.  
  2557.  
  2558.             RETURN VALUES
  2559.             RETURN VALUES
  2560.             _____________
  2561.  
  2562.             Returns the next available character in the input buffer for
  2563.             the port. Returns -1 if the port is not active.
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.                                       Page 37
  2597.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2598.  
  2599.  
  2600.  
  2601.  
  2602.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2603.                              for Microsoft and Turbo C
  2604.  
  2605.            _______________________________________________________________
  2606.  
  2607.                                      lc_setmdm
  2608.            _______________________________________________________________
  2609.  
  2610.  
  2611.             SUMMARY
  2612.             SUMMARY
  2613.             _______
  2614.  
  2615.                  #include <litecomm.h>
  2616.                  
  2617.                  int lc_setmdm(port, newset)
  2618.                  
  2619.                       unsigned port;
  2620.                       unsigned newset;
  2621.  
  2622.  
  2623.             DESCRIPTION
  2624.             DESCRIPTION
  2625.             ___________
  2626.  
  2627.             Set one or more of the modem control signals. Because of the
  2628.             need to always have OUT2 set for interrupt support, the
  2629.             function always provides the correct setting for this bit.
  2630.             Use the mask values found in the include file.
  2631.  
  2632.  
  2633.  
  2634.             RETURN VALUES
  2635.             RETURN VALUES
  2636.             _____________
  2637.  
  2638.             Returns 0 if the operation was successful, returns -1
  2639.             otherwise.
  2640.  
  2641.  
  2642.  
  2643.             SEE ALSO
  2644.             SEE ALSO
  2645.             ________
  2646.                  lc_clrmdm, lc_togmdm
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.                                       Page 38
  2672.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2673.  
  2674.  
  2675.  
  2676.  
  2677.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2678.                              for Microsoft and Turbo C
  2679.  
  2680.            _______________________________________________________________
  2681.  
  2682.                                      lc_clrmdm
  2683.            _______________________________________________________________
  2684.  
  2685.  
  2686.             SUMMARY
  2687.             SUMMARY
  2688.             _______
  2689.  
  2690.                  #include <litecomm.h>
  2691.                  
  2692.                  int lc_clrmdm(port, newset)
  2693.                  
  2694.                       unsigned port;
  2695.                       unsigned newset;
  2696.  
  2697.  
  2698.             DESCRIPTION
  2699.             DESCRIPTION
  2700.             ___________
  2701.  
  2702.             Companion to setmdm function. Clears one or more of the
  2703.             modem control signals. Because of the need to always have
  2704.             OUT2 set for interrupt support, the function always provides
  2705.             the correct setting for this bit. Use the mask values found
  2706.             in the include file.
  2707.  
  2708.  
  2709.  
  2710.             RETURN VALUES
  2711.             RETURN VALUES
  2712.             _____________
  2713.  
  2714.             Returns 0 if the operation was successful, returns -1
  2715.             otherwise.
  2716.  
  2717.  
  2718.  
  2719.             SEE ALSO
  2720.             SEE ALSO
  2721.             ________
  2722.                  lc_setmdm, lc_togmdm
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.                                       Page 39
  2747.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2748.  
  2749.  
  2750.  
  2751.  
  2752.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2753.                              for Microsoft and Turbo C
  2754.  
  2755.            _______________________________________________________________
  2756.  
  2757.                                      lc_togmdm
  2758.            _______________________________________________________________
  2759.  
  2760.  
  2761.             SUMMARY
  2762.             SUMMARY
  2763.             _______
  2764.  
  2765.                  #include <litecomm.h>
  2766.                  
  2767.                  int lc_togmdm(port, newset)
  2768.                  
  2769.                       unsigned port;
  2770.                       unsigned newset;
  2771.  
  2772.  
  2773.             DESCRIPTION
  2774.             DESCRIPTION
  2775.             ___________
  2776.  
  2777.             Companion to setmdm function. Flip-flops one or more of the
  2778.             modem control signals. Because of the need to always have
  2779.             OUT2 set for interrupt support, the function always provides
  2780.             the correct setting for this bit. Use the mask values found
  2781.             in the include file.
  2782.  
  2783.  
  2784.  
  2785.             RETURN VALUES
  2786.             RETURN VALUES
  2787.             _____________
  2788.  
  2789.             Returns 0 if the operation was successful, returns -1
  2790.             otherwise.
  2791.  
  2792.  
  2793.  
  2794.             SEE ALSO
  2795.             SEE ALSO
  2796.             ________
  2797.                  lc_setmdm, lc_clrmdm
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.                                       Page 40
  2822.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2823.  
  2824.  
  2825.  
  2826.  
  2827.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2828.                              for Microsoft and Turbo C
  2829.  
  2830.            _______________________________________________________________
  2831.  
  2832.                                       lc_xoff
  2833.            _______________________________________________________________
  2834.  
  2835.  
  2836.             SUMMARY
  2837.             SUMMARY
  2838.             _______
  2839.  
  2840.                  #include <litecomm.h>
  2841.                  
  2842.                  int lc_xoff(port, flag)
  2843.                  
  2844.                       unsigned port;
  2845.                       BOOL flag; /* #define BOOL int */
  2846.  
  2847.  
  2848.             DESCRIPTION
  2849.             DESCRIPTION
  2850.             ___________
  2851.  
  2852.             If flag is TRUE, turns on semi-automatic XON-XOFF flow
  2853.             control function. If flag is FALSE (the default setting),
  2854.             automatic flow control is disabled. When enabled, the kernel
  2855.             will automatically transmit an XOFF if and when the input
  2856.             buffer is approximately 2/3 full and will automatically
  2857.             recognize an XOFF sent by the companion system. If the
  2858.             companion system transmits an XOFF, the kernel will refuse
  2859.             to send any characters until the condition is cleared.
  2860.  
  2861.  
  2862.             It is the programmer's responsibility to transmit XON when
  2863.             conditions permit. See the lc_putxoff function to tell if an
  2864.             automatic XOFF has been sent by the kernel. See the
  2865.             lc_gotxoff function to determine if the kernel has detected
  2866.             an XOFF.
  2867.  
  2868.  
  2869.             If you intended to implement a protocol that might include
  2870.             the XON-XOFF characters, be sure to disable the automatic
  2871.             flow control. Failure to do so may result in a system hang.
  2872.  
  2873.  
  2874.  
  2875.             RETURN VALUES
  2876.             RETURN VALUES
  2877.             _____________
  2878.  
  2879.             Returns 0 if the operation was successful, returns -1
  2880.             otherwise.
  2881.  
  2882.  
  2883.  
  2884.             SEE ALSO
  2885.             SEE ALSO
  2886.             ________
  2887.                  lc_gotxoff, lc_putxoff
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.                                       Page 41
  2897.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2898.  
  2899.  
  2900.  
  2901.  
  2902.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2903.                              for Microsoft and Turbo C
  2904.  
  2905.            _______________________________________________________________
  2906.  
  2907.                                      lc_gotxoff
  2908.            _______________________________________________________________
  2909.  
  2910.  
  2911.             SUMMARY
  2912.             SUMMARY
  2913.             _______
  2914.  
  2915.                  #include <litecomm.h>
  2916.                  
  2917.                  BOOL lc_gotxoff(port)
  2918.                  
  2919.                       unsigned port;
  2920.                       /* #define BOOL int */
  2921.  
  2922.  
  2923.             DESCRIPTION
  2924.             DESCRIPTION
  2925.             ___________
  2926.  
  2927.             See below for the values returned. If an XOFF has been
  2928.             received, the port's flag will be reset, and transmission to
  2929.             the companion system will be permitted. If an XON is
  2930.             received from the companion system, the port's flag will
  2931.             also be reset, permitting further transmissions to occur. Be
  2932.             aware that if the companion system never sends an XON after
  2933.             sending an XOFF, a possible race condition may occur,
  2934.                                         race                     
  2935.                                         ____                     
  2936.             resulting in a system hang.
  2937.  
  2938.  
  2939.  
  2940.             RETURN VALUES
  2941.             RETURN VALUES
  2942.             _____________
  2943.  
  2944.             Returns TRUE if an XOFF was detected, FALSE if an XOFF was
  2945.             not detected. Will return -1 in the case of an error.
  2946.  
  2947.  
  2948.  
  2949.             SEE ALSO
  2950.             SEE ALSO
  2951.             ________
  2952.                  lc_xoff, lc_putxoff
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.                                       Page 42
  2974.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  2975.  
  2976.  
  2977.  
  2978.  
  2979.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  2980.                              for Microsoft and Turbo C
  2981.  
  2982.            _______________________________________________________________
  2983.  
  2984.                                      lc_putxoff
  2985.            _______________________________________________________________
  2986.  
  2987.  
  2988.             SUMMARY
  2989.             SUMMARY
  2990.             _______
  2991.  
  2992.                  #include <litecomm.h>
  2993.                  
  2994.                  BOOL lc_putxoff(port)
  2995.                  
  2996.                       unsigned port;
  2997.                       /* #define BOOL int */
  2998.  
  2999.  
  3000.             DESCRIPTION
  3001.             DESCRIPTION
  3002.             ___________
  3003.  
  3004.             See below for the values returned. If an XOFF has been sent,
  3005.             the port's flag will be reset. Use this function in concert
  3006.             with transmission of an XON character to the companion
  3007.             system to permit transmissions to proceed.
  3008.  
  3009.  
  3010.  
  3011.             RETURN VALUES
  3012.             RETURN VALUES
  3013.             _____________
  3014.  
  3015.             Returns TRUE if XOFF was sent to the companion system, FALSE
  3016.             if XOFF not sent since the last time the function was
  3017.             called. Will return -1 in the case of an error.
  3018.  
  3019.  
  3020.  
  3021.             SEE ALSO
  3022.             SEE ALSO
  3023.             ________
  3024.                  lc_xoff, lc_putxoff
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.                                       Page 43
  3049.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3050.  
  3051.  
  3052.  
  3053.  
  3054.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3055.                              for Microsoft and Turbo C
  3056.  
  3057.            _______________________________________________________________
  3058.  
  3059.                                        lc_get
  3060.            _______________________________________________________________
  3061.  
  3062.  
  3063.             SUMMARY
  3064.             SUMMARY
  3065.             _______
  3066.  
  3067.                  #include <litecomm.h>
  3068.                  int lc_get(port)
  3069.                  
  3070.                       unsigned port;
  3071.  
  3072.  
  3073.             DESCRIPTION
  3074.             DESCRIPTION
  3075.             ___________
  3076.  
  3077.             Read a character from the serial port's input buffer.
  3078.  
  3079.  
  3080.  
  3081.             RETURN VALUES
  3082.             RETURN VALUES
  3083.             _____________
  3084.  
  3085.             Returns the next available character in the input buffer for
  3086.             the port. Returns -1 if the port is not active, or if there
  3087.             are not characters in the port's buffer.
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.                                       Page 44
  3122.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3123.  
  3124.  
  3125.  
  3126.  
  3127.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3128.                              for Microsoft and Turbo C
  3129.  
  3130.            _______________________________________________________________
  3131.  
  3132.                                       lc_peek
  3133.            _______________________________________________________________
  3134.  
  3135.  
  3136.             SUMMARY
  3137.             SUMMARY
  3138.             _______
  3139.  
  3140.                  #include <litecomm.h>
  3141.                  
  3142.                  int lc_peek(port)
  3143.                  
  3144.                       unsigned port;
  3145.  
  3146.  
  3147.             DESCRIPTION
  3148.             DESCRIPTION
  3149.             ___________
  3150.  
  3151.             Look at the next character in the serial port's input
  3152.             buffer.
  3153.  
  3154.  
  3155.  
  3156.             RETURN VALUES
  3157.             RETURN VALUES
  3158.             _____________
  3159.  
  3160.             Returns the next available character in the input buffer for
  3161.             the port, but does not remove the character from the buffer.
  3162.             This allows the application to look-ahead by one character
  3163.                                            look-ahead                 
  3164.                                            __________                 
  3165.             in a non-destructive fashion. Returns -1 if the port is not
  3166.             active, or if there are no characters in the port's buffer.
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.                                       Page 45
  3197.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3198.  
  3199.  
  3200.  
  3201.  
  3202.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3203.                              for Microsoft and Turbo C
  3204.  
  3205.            _______________________________________________________________
  3206.  
  3207.                                        lc_put
  3208.            _______________________________________________________________
  3209.  
  3210.  
  3211.             SUMMARY
  3212.             SUMMARY
  3213.             _______
  3214.  
  3215.                  #include <litecomm.h>
  3216.                  
  3217.                  int lc_put(port,ch)
  3218.                  
  3219.                       unsigned port;
  3220.                       char ch;
  3221.  
  3222.  
  3223.             DESCRIPTION
  3224.             DESCRIPTION
  3225.             ___________
  3226.  
  3227.             Place a character into the serial port's output buffer.
  3228.  
  3229.  
  3230.  
  3231.             RETURN VALUES
  3232.             RETURN VALUES
  3233.             _____________
  3234.  
  3235.             Returns 0 if successful. Note that this does not guarantee
  3236.             that the character has been sent, only that no errors were
  3237.             detected. Returns -1 if the port is not active, or if there
  3238.             no room in the port's buffer.
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254.  
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.                                       Page 46
  3270.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3271.  
  3272.  
  3273.  
  3274.  
  3275.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3276.                              for Microsoft and Turbo C
  3277.  
  3278.            _______________________________________________________________
  3279.  
  3280.                                       lc_gets
  3281.            _______________________________________________________________
  3282.  
  3283.  
  3284.             SUMMARY
  3285.             SUMMARY
  3286.             _______
  3287.  
  3288.                  #include <litecomm.h>
  3289.                  
  3290.                  int lc_gets(port, buff, cnt)
  3291.                  
  3292.                       unsigned port;
  3293.                       char *buff;
  3294.                       int cnt;
  3295.  
  3296.  
  3297.             DESCRIPTION
  3298.             DESCRIPTION
  3299.             ___________
  3300.  
  3301.             Read a stream of, at most, cnt characters from the serial
  3302.             port's input buffer into the buff location. Not sensitive to
  3303.             NULL character.
  3304.  
  3305.  
  3306.  
  3307.             RETURN VALUES
  3308.             RETURN VALUES
  3309.             _____________
  3310.  
  3311.              Returns the count of characters actually transferred, or -1
  3312.             if an error occurs.
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.                                       Page 47
  3343.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3344.  
  3345.  
  3346.  
  3347.  
  3348.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3349.                              for Microsoft and Turbo C
  3350.  
  3351.            _______________________________________________________________
  3352.  
  3353.                                       lc_puts
  3354.            _______________________________________________________________
  3355.  
  3356.  
  3357.             SUMMARY
  3358.             SUMMARY
  3359.             _______
  3360.  
  3361.                  #include <litecomm.h>
  3362.                  int lc_puts(port, buff, cnt)
  3363.                  
  3364.                       unsigned port;
  3365.                       char *buff;
  3366.                       int cnt;
  3367.  
  3368.  
  3369.             DESCRIPTION
  3370.             DESCRIPTION
  3371.             ___________
  3372.  
  3373.             Place a stream of, at most,cnt characters into the serial
  3374.                                        cnt                           
  3375.                                        ___                           
  3376.             port's output buffer.
  3377.  
  3378.  
  3379.  
  3380.             RETURN VALUES
  3381.             RETURN VALUES
  3382.             _____________
  3383.  
  3384.             Returns the number of characters actually placed into the
  3385.             buffer. Note that this does not guarantee that the
  3386.             characters have been sent. Returns 0 if any error occurs, or
  3387.             if there no room in the port's buffer.
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.                                       Page 48
  3418.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3419.  
  3420.  
  3421.  
  3422.  
  3423.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3424.                              for Microsoft and Turbo C
  3425.  
  3426.            _______________________________________________________________
  3427.  
  3428.                                       lc_flush
  3429.            _______________________________________________________________
  3430.  
  3431.  
  3432.             SUMMARY
  3433.             SUMMARY
  3434.             _______
  3435.  
  3436.                  #include <litecomm.h>
  3437.                  
  3438.                  int lc_tflush(port)
  3439.                  
  3440.                  int lc_rflush(port)
  3441.                  
  3442.                  int lc_flshtrue(port, ch)
  3443.                  
  3444.                  int lc_nflush(port, cnt)
  3445.                  
  3446.                       unsigned port;
  3447.                       char ch;
  3448.                       int cnt;
  3449.  
  3450.  
  3451.             DESCRIPTION
  3452.             DESCRIPTION
  3453.             ___________
  3454.  
  3455.             The <?>flush functions remove characters from the specified
  3456.             buffer and discard them; untransmitted characters in the
  3457.             transmit buffer are NEVER sent; unprocessed characters in
  3458.             the receive buffer are lost.
  3459.  
  3460.  
  3461.             lc_tflush empties the port's transmit buffer immediately.
  3462.  
  3463.  
  3464.             lc_rflush empties the port's receive buffer immediately.
  3465.  
  3466.  
  3467.             lc_flshtrue will continually dispose of received characters
  3468.             until the character ch is received. Use caution with this
  3469.             one since it does not detect port number errors.
  3470.  
  3471.  
  3472.             lc_nflush flushes, at most, cnt characters from the port's
  3473.             receive buffer.
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.                                       Page 49
  3489.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3490.  
  3491.  
  3492.  
  3493.  
  3494.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3495.                              for Microsoft and Turbo C
  3496.  
  3497.             RETURN VALUES
  3498.             RETURN VALUES
  3499.             _____________
  3500.  
  3501.             lc_flshtrue returns no values. lc_tflush and lc_rflush
  3502.             return 0 if successful and -1 if an error occurs. lc_nflush
  3503.             returns the number of characters actually flushed from the
  3504.             receive buffer or 0 in the case of no characters to flush,
  3505.             or if an error was detected an error.
  3506.  
  3507.  
  3508.  
  3509.  
  3510.  
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.                                       Page 50
  3557.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3558.  
  3559.  
  3560.  
  3561.  
  3562.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3563.                              for Microsoft and Turbo C
  3564.  
  3565.            _______________________________________________________________
  3566.  
  3567.                                       lc_sbrk
  3568.            _______________________________________________________________
  3569.  
  3570.  
  3571.             SUMMARY
  3572.             SUMMARY
  3573.             _______
  3574.  
  3575.                  #include <litecomm.h>
  3576.                  
  3577.                  int lc_sbrk(port)
  3578.                  lc_gotbrk(port)
  3579.                  
  3580.                       unsigned port;
  3581.  
  3582.  
  3583.             DESCRIPTION
  3584.             DESCRIPTION
  3585.             ___________
  3586.  
  3587.             lc_sbrk() generates a BREAK signal using a particular
  3588.             characteristic of the 8250 UART to generate a more accurate
  3589.             BREAK at any baud rate.  BREAKS generated in this manner are
  3590.             timed based upon the baud rate at which the 8250 is
  3591.             currently initialized.  This function may or may not work
  3592.             correctly with other than the actual 8250 UART.
  3593.  
  3594.  
  3595.             lc_gotbrk returns TRUE if a break signal has been received
  3596.             on the specified port.  It returns FALSE otherwise.
  3597.  
  3598.  
  3599.  
  3600.             RETURN VALUES
  3601.             RETURN VALUES
  3602.             _____________
  3603.  
  3604.             Returns 0 if successful. Returns -1 if the port is not
  3605.             active.
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.                                       Page 51
  3630.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3631.  
  3632.  
  3633.  
  3634.  
  3635.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3636.                              for Microsoft and Turbo C
  3637.  
  3638.            _______________________________________________________________
  3639.  
  3640.                                HAYES MODEM FUNCTIONS
  3641.            _______________________________________________________________
  3642.  
  3643.             Note - When using the following functions, you must include
  3644.             ___________________________________________________________
  3645.             the file litehcm.h in your program. litehcm.h automatically
  3646.             ___________________________________________________________
  3647.             includes the litecomm.h header file.
  3648.             ____________________________________
  3649.  
  3650.  
  3651.  
  3652.             FUNCTIONS
  3653.             FUNCTIONS
  3654.             _________
  3655.  
  3656.                       lch_codeset
  3657.                       lch_dial
  3658.                       lch_fduplex
  3659.                       lch_hduplex
  3660.                       lch_greg
  3661.                       lch_sreg
  3662.                       lch_offcarr
  3663.                       lch_oncarr
  3664.                       lch_offecho
  3665.                       lch_onecho
  3666.                       lch_hook
  3667.                       lch_redo
  3668.                       lch_numres
  3669.                       lch_wrdres
  3670.                       lch_codesoff
  3671.                       lch_codeson
  3672.                       lch_pulse
  3673.                       lch_tone
  3674.                       lch_speaker
  3675.                       _retset
  3676.                       _rettype
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.                                       Page 52
  3702.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3703.  
  3704.  
  3705.  
  3706.  
  3707.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3708.                              for Microsoft and Turbo C
  3709.  
  3710.             SUMMARY
  3711.             SUMMARY
  3712.             _______
  3713.  
  3714.                  #include <litehcm.h>
  3715.                  
  3716.                  int lch_codeset(port,mode)
  3717.                  
  3718.                  int lch_dial(port,dstr)
  3719.                  
  3720.                  int lch_fduplex(port)
  3721.                  
  3722.                  int lch_hduplex(port)
  3723.                  
  3724.                  int lch_greg(port,reg)
  3725.                  
  3726.                  int lch_sreg(port,reg,value)
  3727.                  
  3728.                  int lch_offcarr(port)
  3729.                  
  3730.                  int lch_oncarr(port)
  3731.                  
  3732.                  int lch_offecho(port)
  3733.                  
  3734.                  int lch_onecho(port)
  3735.                  
  3736.                  int lch_hook(port,hmode)
  3737.                  
  3738.                  int lch_redo(port)
  3739.                  
  3740.                  int lch_numres(port)
  3741.                  
  3742.                  int lch_wrdres(port)
  3743.                  
  3744.                  int lch_codesoff(port)
  3745.                  
  3746.                  int lch_codeson(port)
  3747.                  
  3748.                  int lch_pulse(port)
  3749.                  
  3750.                  int lch_tone(port)
  3751.                  
  3752.                  int lch_speaker(port,spkmode)
  3753.                  
  3754.                  int _retset()
  3755.                  
  3756.                  int _rettype()
  3757.                  
  3758.                       unsigned port;
  3759.                       unsigned mode;
  3760.                       char *dstr;
  3761.                       unsigned reg;
  3762.                       int value;
  3763.                       unsigned hmode;
  3764.                  unsigned spkmode;
  3765.  
  3766.  
  3767.  
  3768.  
  3769.                                       Page 53
  3770.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3771.  
  3772.  
  3773.  
  3774.  
  3775.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3776.                              for Microsoft and Turbo C
  3777.  
  3778.             DESCRIPTION
  3779.             DESCRIPTION
  3780.             ___________
  3781.  
  3782.             The values to be used in conjunction with mode, hmode, and
  3783.             spkmode are defined in the #include-d file litehcm.h.
  3784.  
  3785.  
  3786.             The lch_codeset function allows you to change the set of
  3787.             codes that are returned by the modem when an action is
  3788.             specified.
  3789.  
  3790.  
  3791.             lch_dial instructs the modem to dial the number contained in
  3792.             dstr. Do not include the dialing (ATD) prefix, or the
  3793.             trailing <CR>. These are provided by the function. You may
  3794.             include non-numeric characters as the contents of dstr are
  3795.             not checked. The dialing is done in the last known, pulse or
  3796.             tone, mode. If you use the lch_pulse or lch_tone functions,
  3797.             then dialing will be done in the mode that was last
  3798.             correctly enabled. If you have not exercised these
  3799.             functions, then dialing occurs in the modems default or
  3800.             power-up mode.
  3801.  
  3802.  
  3803.             The lch_hduplex and lch_fduplex functions place the modem
  3804.             into local echo and remote echo modes respectively.
  3805.  
  3806.  
  3807.             The lch_greg function requests that the modem report the
  3808.             current value of S-register reg. Reg must be in the range 0
  3809.             to 13. Use the lch_gets, or similar function, to retrieve
  3810.             the modem's response. Specifying a register outside the 0 to
  3811.             13 range will cause a return of -1.
  3812.  
  3813.  
  3814.             lch_sreg is the companion to lch_greg, with the same
  3815.             restrictions. Sets the S-register reg to the value contained
  3816.             in value. If value contains -1, then the register is reset
  3817.             to its default (power-up) value. The function checks the
  3818.             value to be certain that it is within the limits specified
  3819.             for the particular register, and returns a value of -1 if
  3820.             the value is outside the predefined limits.
  3821.  
  3822.  
  3823.             lch_offcarr enables modem carrier detect, but disables the
  3824.             modems carrier signal. The lch_oncarr companion enables both
  3825.             carrier detect and the modems carrier signal. When
  3826.             lch_offcarr is used the modem will receive data but will be
  3827.             unable to send data.
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.                                       Page 54
  3838.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3839.  
  3840.  
  3841.  
  3842.  
  3843.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3844.                              for Microsoft and Turbo C
  3845.  
  3846.             The lch_offecho and lch_onecho functions determine whether
  3847.             commands sent to the modem are echoed back to the sending
  3848.             program. With echo turned off, the modem will continue to
  3849.             accept commands, but will not try to redisplay the command's
  3850.             characters.
  3851.  
  3852.  
  3853.             lch_hook allows you to control the current status of the
  3854.             modem's telephone line connection. See your modem's
  3855.             documentation and the include file for additional
  3856.             information.
  3857.  
  3858.  
  3859.             The lch_redo function instructs the modem to repeat the last
  3860.             command sequence executed. Generally, this function is of
  3861.             greatest value in re-dialing numbers that are busy, although
  3862.             its use is not restricted to that.
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.  
  3902.  
  3903.                                       Page 55
  3904.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3905.  
  3906.  
  3907.  
  3908.  
  3909.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3910.                              for Microsoft and Turbo C
  3911.  
  3912.             The way in which your modem responds to commands is
  3913.             determined, in part by the lch_wrdres and lch_numres
  3914.             functions. If you call lch_wrdres, then modem responses use
  3915.             the English language response codes, e.g. CONNECT or OK.
  3916.             Calling lch_numres instructs the modem to respond with code
  3917.             numbers only from the currently selected response set, see
  3918.             the lch_codeset function above.
  3919.  
  3920.  
  3921.             You may use the functions lch_codeson and lch_codesoff to
  3922.             specify whether you want your modem to send back response
  3923.             codes when it receives a command string. In a sense, these
  3924.             act as companions to the lch_xxxecho functions above.
  3925.  
  3926.  
  3927.             Use the lch_speaker function to control the modem's internal
  3928.             speaker, if it has one. See litehcm.h for the applicable
  3929.             codes.
  3930.  
  3931.  
  3932.             The _retset and _rettype functions return, respectively, the
  3933.             last known command set (lch_codeset) and last known result
  3934.             type (lch_wrdres, lch_numres). These functions (_retset,
  3935.             _rettype) are only of value when used in conjunction with
  3936.             the companion functions.
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.                                       Page 56
  3970.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  3971.  
  3972.  
  3973.  
  3974.  
  3975.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  3976.                              for Microsoft and Turbo C
  3977.  
  3978.             GENERAL REMARKS
  3979.             GENERAL REMARKS
  3980.             _______________
  3981.  
  3982.             Several considerations are in order if you intend to use the
  3983.             Hayes ToolBox functions.
  3984.  
  3985.  
  3986.  
  3987.                 1. You are responsible for checking the return
  3988.                    codes from the modem once you have given modem a
  3989.                    command. To make the task easier, we suggest
  3990.                    that you turn OFF command echo (so that you
  3991.                    don't have to worry about separating commands
  3992.                    from responses) and turn ON numeric responses
  3993.                    (to make the interpretation of result codes
  3994.                    easier and faster).
  3995.  
  3996.  
  3997.                 2. Be sure that you allow  adequate time between
  3998.                    commands for the modem to process the command
  3999.                    and respond. Failure to observe this rule may
  4000.                    result in commands being misinterpreted or
  4001.                    "lost". You can monitor the number of characters
  4002.                    in the receive buffer to help you with the
  4003.                    timing. Or alternatively, check the response
  4004.                    after each command. The latter approach is more
  4005.                    in line with what we believe to be good
  4006.                    programming practice.
  4007.  
  4008.  
  4009.             RETURN VALUES
  4010.             RETURN VALUES
  4011.             _____________
  4012.  
  4013.             All functions return a value of -1 if a port or other error
  4014.             is detected, zero otherwise.
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.                                       Page 57
  4040.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  4041.  
  4042.  
  4043.  
  4044.  
  4045.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  4046.                              for Microsoft and Turbo C
  4047.  
  4048.                               MISCELLANEOUS FUNCTIONS
  4049.                               MISCELLANEOUS FUNCTIONS
  4050.                               _______________________
  4051.  
  4052.             These additional functions, while part of the LiteComm
  4053.             These additional functions, while part of the LiteComm
  4054.             ______________________________________________________
  4055.             library, are intended for use with LXM, the xmodem engine.
  4056.             library, are intended for use with LXM, the xmodem engine.
  4057.             __________________________________________________________
  4058.  
  4059.  
  4060.  
  4061.            _______________________________________________________________
  4062.  
  4063.                                     lc_insclock
  4064.            _______________________________________________________________
  4065.  
  4066.  
  4067.             SUMMARY
  4068.             SUMMARY
  4069.             _______
  4070.  
  4071.                  #include <lctime.h>
  4072.                  
  4073.                  int lc_insclock() /* install programmable timer */
  4074.                  
  4075.                  void lc_clrclock() /* remove programmable timer */
  4076.  
  4077.  
  4078.             DESCRIPTION
  4079.             DESCRIPTION
  4080.             ___________
  4081.  
  4082.              Install the programmable interval timer at interrupt vector
  4083.             0x1C, if not already installed. You must use this function
  4084.             before attempting to access any of the other functions in
  4085.             this set. In addition, Datalight users must, upon
  4086.             termination of their program, reset the vector by using the
  4087.             lc_clrclock function. Turbo C and Microsoft C users need to
  4088.             know that the an exit() function is installed to
  4089.             automatically replace the vector by calling lc_clrclock.
  4090.  
  4091.  
  4092.  
  4093.             RETURN VALUES
  4094.             RETURN VALUES
  4095.             _____________
  4096.  
  4097.             lc_insclock always returns 0, lc_clrclock never returns a
  4098.             value.
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.                                       Page 58
  4118.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  4119.  
  4120.  
  4121.  
  4122.  
  4123.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  4124.                              for Microsoft and Turbo C
  4125.  
  4126.            _______________________________________________________________
  4127.  
  4128.                                     lc_setclock
  4129.            _______________________________________________________________
  4130.  
  4131.  
  4132.             SUMMARY
  4133.             SUMMARY
  4134.             _______
  4135.  
  4136.                  #include <lctime.h>
  4137.                  
  4138.                  void lc_setclock(secs)
  4139.                  
  4140.                       unsigned secs;
  4141.  
  4142.  
  4143.             DESCRIPTION
  4144.             DESCRIPTION
  4145.             ___________
  4146.  
  4147.             Sets the programmable timer to the number of seconds
  4148.             specified in secs. The amount of time remaining on the
  4149.             clock, in seconds, can be examined in the _secs_rem
  4150.             variable, defined in lctime.h. _secs_rem will never decrease
  4151.             below a value of zero.
  4152.  
  4153.  
  4154.  
  4155.             RETURN VALUES
  4156.             RETURN VALUES
  4157.             _____________
  4158.  
  4159.             lc_setclock never returns a value.
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.                                       Page 59
  4191.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  4192.  
  4193.  
  4194.  
  4195.  
  4196.                         LITECOMM (TM) COMMUNICATIONS TOOLBOX
  4197.                              for Microsoft and Turbo C
  4198.  
  4199.  
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.  
  4208.  
  4209.  
  4210.  
  4211.  
  4212.  
  4213.  
  4214.  
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.                                       Page 60
  4257.                CopyRight (c) 1987, 1988 Information Technology, Ltd.
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.                                  REGISTRATION FORM
  4264.                                  REGISTRATION FORM
  4265.                                  _________________
  4266.  
  4267.             Please complete the following information. Note that the
  4268.             prices below are for a single-use registration only. Please
  4269.             contact us directly for site licensing.
  4270.  
  4271.             Mail to:
  4272.                  Information Technology
  4273.                  PO Box 554
  4274.                  Coventry, RI 02816
  4275.                  Telephone Orders or Information (401) 826-2223
  4276.             ┌──────────────────────────────────────────────────────────┐
  4277.             │ SHIP TO:                                                 │
  4278.             │ Name    ________________________________________         │
  4279.             │                                                          │
  4280.             │ Company ________________________________________         │
  4281.             │                                                          │
  4282.             │ Street  ________________________________________         │
  4283.             │                                                          │
  4284.             │         ________________________________________         │
  4285.             │                                                          │
  4286.             │ City    ___________________  State __  Zip _____         │
  4287.             │                                                          │
  4288.             │ Telephone _______________________                        │
  4289.             ├─────┬──────────┬───────────────────┬─────────────────────┤
  4290.             │     │          │                   │                     │
  4291.             │ QTY │ COMPILER │ REGISTRATION TYPE │ REGISTRATION FEE    │
  4292.             │     │          │                   │                     │
  4293.             ├─────┼──────────┼───────────────────┼─────────────────────┤
  4294.             │     │          │                   │                     │
  4295.             │     │          │ LIBRARIES @ $25   │                     │
  4296.             │     │          │                   │                     │
  4297.             ├─────┼──────────┼───────────────────┼─────────────────────┤
  4298.             │     │          │                   │                     │
  4299.             │     │          │ LIBRARIES AND     │                     │
  4300.             │     │          │ SOURCE  @ $50     │                     │
  4301.             │     │          │                   │                     │
  4302.             ├─────┼──────────┼───────────────────┼─────────────────────┤
  4303.             │     │          │                   │                     │
  4304.             │     │          │ RI Sales Tax 6%   │                     │
  4305.             │     │          │                   │                     │
  4306.             └─────┴──────────┴───────────────────┴─────────────────────┘
  4307.             Method of Payment (Check, Mastercard, Visa) _____________
  4308.             
  4309.                  Credit Card Number __________________________
  4310.             
  4311.                  Expiration Date __________________________
  4312.             
  4313.                  Name as it appears on card ___________________________
  4314.             
  4315.                  Signature for MC/VISA ________________________________
  4316.             
  4317.             All MasterCard/Visa orders must include a telephone number,
  4318.             
  4319.             We regret that we cannot accept COD orders
  4320.            _______________________________________________________________
  4321.             (office use only)
  4322.                 Date Received ______________ Date Sent _____________
  4323.                 Version ______________ Serial Number _______________
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.                                                                         lxii
  4331.  
  4332.  
  4333.                                    TABLE OF CONTENTS
  4334.                                    TABLE OF CONTENTS
  4335.                                    _________________
  4336.  
  4337.                 OVERVIEW........................................... 1
  4338.                     FEATURES....................................... 1
  4339.                     THE SHAREWARE CONCEPT.......................... 1
  4340.  
  4341.                 LICENSE, WARRANTY AND REGISTRATION................. 2
  4342.                     LICENSE........................................ 2
  4343.                     WARRANTY....................................... 3
  4344.                     REGISTERING YOUR COPY.......................... 4
  4345.                     NOTE........................................... 5
  4346.  
  4347.                 COMMUNICATIONS AND THE PC.......................... 6
  4348.                     PC SHORTCOMINGS................................ 6
  4349.                     THE 8250 UART.................................. 6
  4350.                     SIGNAL DESCRIPTIONS............................ 8
  4351.  
  4352.                 TOOLBOX NOTES AND WARNINGS......................... 8
  4353.  
  4354.                 RECENT CHANGES..................................... 11
  4355.                     NEW IN VERSION 2.XX............................ 11
  4356.                     NEW IN VERSION 3.00............................ 12
  4357.  
  4358.                 BEYOND COM2........................................ 13
  4359.                     THE TOOLBOX METHODOLOGY........................ 13
  4360.                     CAUTIONS....................................... 14
  4361.  
  4362.                 PACKAGE CONTENTS................................... 16
  4363.  
  4364.                 COMPILER-SPECIFIC INSTRUCTIONS..................... 17
  4365.                     INSTALLING THE TURBO C VERSION................. 17
  4366.                     INSTALLING THE MICROSOFT C VERSION............. 19
  4367.                     GENERAL NOTES.................................. 21
  4368.  
  4369.                 FUNCTION REFERENCE................................. 22
  4370.  
  4371.                 HAYES MODEM FUNCTIONS.............................. 47
  4372.                     GENERAL REMARKS................................ 51
  4373.  
  4374.                 MISCELLANEOUS FUNCTIONS............................ 52
  4375.  
  4376.                 REGISTRATION FORM.................................. 55
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.                                               lch_hduplex  47
  4399.                                               lch_hook  47
  4400.     _______________________________________
  4401.                                               lch_numres  47
  4402.                                               lch_offcarr  47
  4403.                     INDEX
  4404.                                               lch_offecho  47
  4405.     _______________________________________
  4406.                                               lch_oncarr  47
  4407.      8250  6, 8
  4408.                                               lch_onecho  47
  4409.      8259  13
  4410.                                               lch_pulse  47
  4411.      _portchg  13
  4412.                                               lch_redo  47
  4413.      _secs_rem  53
  4414.                                               lch_speaker  47
  4415.      Asynchronous  7
  4416.                                               lch_sreg  47
  4417.      BIOS  6, 14
  4418.                                               lch_tone  47
  4419.      Bit number  23
  4420.                                               lch_wrdres  47
  4421.      BREAK  46
  4422.                                             Interrupt enable flag  10
  4423.      Buffers  10, 25
  4424.                                             Interrupt request  13
  4425.      Clocking-in  7
  4426.                                             Interrupt vector  13
  4427.      COM3  14, 23
  4428.                                             Interrupts  6
  4429.      COM4  14, 23
  4430.                                             IRQ  14
  4431.      Control block  10
  4432.                                             Memory  10
  4433.      Dialing  49
  4434.                                             Port  21
  4435.      Flow control  36
  4436.                                             S-register  49
  4437.      Functions
  4438.                                             Serial port  6
  4439.        _portchg  23
  4440.                                             Start bit  7
  4441.        comm_close  26
  4442.                                             Stop bits  7
  4443.        comm_opn  25
  4444.                                             Structure alignment  10
  4445.        comm_setup  27
  4446.                                             TSR  21
  4447.        lc_clrmdm  34
  4448.                                             XOFF  36, 37, 38
  4449.        lc_estat  31
  4450.                                             XON  36, 37, 38
  4451.        lc_flush  44
  4452.        lc_get  39
  4453.        lc_gets  42
  4454.        lc_getw  32
  4455.        lc_gotbrk(port)
  4456.          
  4457.           unsigned port  46
  4458.        lc_gotxoff  37
  4459.        lc_icnt  29
  4460.        lc_insclock  52
  4461.        lc_mstat  30
  4462.        lc_ocnt  29
  4463.        lc_peek  40
  4464.        lc_put  41
  4465.        lc_puts  43
  4466.        lc_putxoff  38
  4467.        lc_sbrk  46
  4468.        lc_setclock  53
  4469.        lc_setmdm  33
  4470.        lc_togmdm  35
  4471.        lc_vport  28
  4472.        lc_xoff  36
  4473.      Handshake  8
  4474.      Hayes Functions
  4475.        _retset  47
  4476.        _rettype  47
  4477.        lch_codeset  47
  4478.        lch_codesoff  47
  4479.        lch_codeson  47
  4480.        lch_dial  47
  4481.        lch_fduplex  47
  4482.        lch_greg  47
  4483.  
  4484.                                           1
  4485.  
  4486.